import request from "@/utils/request";
import { encryptionData } from "@/utils/com";
import Qs from "qs";

/* 商家认证列表 */
export function brandMerchantAuthPage(data) {
  return request({
    url: "/jcd-gys/brandMerchantAuth/page",
    method: "get",
    headers: encryptionData(data, "/jcd-gys/brandMerchantAuth/page"),
    params: data
  });
}
// 详情
export function brandMerchantAuthInfo(data) {
  return request({
    url: "/jcd-gys/brandMerchantAuth/getInfo",
    method: "get",
    headers: encryptionData(data, "/jcd-gys/brandMerchantAuth/getInfo"),
    params: data
  });
}
// 审核
export function brandMerchantAuthAudit(data) {
  return request({
    url: "/jcd-gys/brandMerchantAuth/audit",
    method: "put",
    headers: encryptionData(data, "/jcd-gys/brandMerchantAuth/audit"),
    data: Qs.stringify(data)
  });
}

/* 服务商认证列表 */
export function serviceAuthPage(data) {
  return request({
    url: "/jcd-gys/zzbServiceMerchant/list",
    method: "get",
    headers: encryptionData(data, "/jcd-gys/zzbServiceMerchant/list"),
    params: data
  });
}

/* 详情 */
export function serviceAuthGetInfo(data) {
  return request({
    url: "/jcd-gys/zzbServiceMerchant/getInfo",
    method: "get",
    headers: encryptionData(data, "/jcd-gys/zzbServiceMerchant/getInfo"),
    params: data
  });
}
// 审核
export function serviceAuthInfo(data) {
  return request({
    url: "/jcd-gys/zzbServiceMerchant/audit",
    method: "post",
    headers: encryptionData(data, "/jcd-gys/zzbServiceMerchant/audit"),
    params: data
  });
}
// 删除
export function serviceAuthDelete(data) {
  return request({
    url: "/jcd-gys/zzbServiceMerchant/delete",
    method: "delete",
    headers: encryptionData(data, "/jcd-gys/zzbServiceMerchant/delete"),
    data: Qs.stringify(data)
  });
}

// 重置密码
export function serviceAuthResetPassword(data) {
  return request({
    url: "/jcd-gys/zzbServiceMerchant/resetPassword",
    method: "delete",
    headers: encryptionData(data, "/jcd-gys/zzbServiceMerchant/resetPassword"),
    data: Qs.stringify(data)
  });
}

/* 消费者认证-列表 */
export function customerAuthPage(data) {
  return request({
    url: "/jcd-sys/zbbConsumerAuth/list",
    method: "get",
    headers: encryptionData(data, "/jcd-gys/zbbConsumerAuth/list"),
    params: data
  });
}

// 审核
export function customerAuthInfo(data) {
  return request({
    url: "/jcd-sys/zbbConsumerAuth/audit",
    method: "post",
    headers: encryptionData(data, "/jcd-gys/zbbConsumerAuth/audit"),
    params: data
  });
}

/* 设计图认证-列表 */
export function designPage(data) {
  return request({
    url: "/jcd-sys/zzbDesignDraw/list",
    method: "get",
    headers: encryptionData(data, "/jcd-gys/zzbDesignDraw/list"),
    params: data
  });
}

// 审核
export function designAuth(data) {
  return request({
    url: "/jcd-sys/zzbDesignDraw/audit",
    method: "post",
    headers: encryptionData(data, "/jcd-gys/zzbDesignDraw/audit"),
    params: data
  });
}

/* 平台托管-列表 */
export function zbbTgOrderPage(data) {
  return request({
    url: "/jcd-order/zbbTgOrder/page",
    method: "get",
    headers: encryptionData(data, "/jcd-order/zbbTgOrder/page"),
    params: data
  });
}

// 审核
export function zbbTgOrderAudit(data) {
  return request({
    url: "/jcd-order/zbbTgOrder/audit",
    method: "get",
    headers: encryptionData(data, "/jcd-gys/zbbTgOrder/audit"),
    params: data
  });
}

// 详情/终止详情
export function zbbTgOrderGetInfo(id) {
  return request({
    url: `/jcd-order/zbbTgOrder/getInfo/${id}`,
    method: "get",
    headers: encryptionData({}, `/jcd-order/zbbTgOrder/getInfo/${id}`)
  });
}

// 查看订单动态
export function zbbTgOrderOrderLog(data) {
  return request({
    url: "/jcd-order/zbbTgOrder/orderLog",
    method: "get",
    headers: encryptionData(data, "/jcd-gys/zbbTgOrder/orderLog"),
    params: data
  });
}